﻿using System;
using Enums;
using XF.ExControls;
using XF.Common;
using System.Windows.Forms;

namespace KYBM
{
    public partial class FrmDialogRemark : XFFormEx
    {
        public string Remark = string.Empty;

        public FrmDialogRemark()
        {
            InitializeComponent();
        }

        private void tsBtnSure_Click(object sender, EventArgs e)
        {
            Remark = tbRemark.Text;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void FrmDialogCheckOut_Load(object sender, EventArgs e)
        {
        }

        private void tsBtnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void FrmDialogCheckOut_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.Enter:
                    tsBtnSure_Click(this, EventArgs.Empty);
                    break;
                case Keys.Escape:
                    tsBtnCancel_Click(this, EventArgs.Empty);
                    break;
            }
        }
    }
}
